<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script src="http://cdn.bootcss.com/lodash.js/4.17.5/lodash.min.js"></script>
    <script>
        //         let str = `3岁	89.1 	12.40 	91.5 	13.40 	94.0 	14.30 	98.0 	15.50 	101.5 	17.00 	105.5 	18.50 	109.4 	20.60 
        // 3.5岁	92.2 	13.00 	95.0 	14.10 	97.8 	15.50 	101.5 	16.80 	105.2 	18.20 	109.5 	20.00 	113.1 	22.30 
        // 4岁	95.2 	13.70 	98.1 	15.00 	101.2 	16.50 	104.9 	17.80 	108.9 	19.40 	113.0 	21.30 	117.0 	24.00 
        // 4.5岁	98.1 	14.50 	101.3 	15.90 	104.5 	17.30 	108.5 	18.90 	112.2 	20.65 	116.5 	22.70 	120.3 	26.00 
        // 5岁	101.1 	15.30 	104.2 	16.80 	107.8 	18.30 	111.9 	20.00 	115.8 	22.00 	119.8 	24.50 	124.0 	28.00 
        // 5.5岁	104.1 	16.20 	107.4 	17.90 	111.0 	19.60 	115.1 	21.30 	119.5 	23.50 	123.7 	26.30 	127.3 	30.00 
        // 6岁	107.4 	17.10 	110.6 	19.00 	114.3 	20.70 	118.4 	22.60 	122.8 	25.05 	127.0 	28.10 	130.7 	32.20 
        // 6.5岁	110.4 	18.00 	113.7 	19.90 	117.6 	21.60 	121.3 	23.80 	125.6 	26.50 	129.8 	29.80 	134.0 	34.20 
        // 7岁	112.8 	19.00 	116.1 	20.80 	120.0 	22.80 	124.1 	25.00 	128.5 	28.00 	132.4 	31.60 	136.7 	36.30 
        // 7.5岁	115.1 	20.00 	118.4 	21.80 	122.2 	23.90 	126.4 	26.50 	130.7 	29.50 	134.8 	33.50 	138.7 	38.40 
        // 8岁	117.6 	20.75 	121.1 	22.80 	124.7 	25.00 	128.8 	28.00 	133.2 	31.20 	137.0 	35.40 	141.0 	40.70 
        // 8.5岁	120.0 	21.90 	123.8 	23.90 	127.2 	26.20 	131.2 	29.55 	135.8 	33.35 	139.6 	37.80 	143.7 	43.20 
        // 9岁	122.4 	23.10 	126.2 	25.10 	130.0 	27.50 	134.0 	31.00 	138.2 	35.30 	142.2 	39.90 	146.1 	45.65 
        // 9.5岁	125.0 	24.10 	128.6 	26.20 	132.3 	28.80 	136.5 	32.70 	140.6 	37.00 	144.6 	42.00 	148.4 	48.00 
        // 10岁	127.3 	25.00 	131.0 	27.50 	135.2 	30.20 	139.1 	34.40 	143.0 	39.00 	147.0 	44.20 	150.8 	50.40 
        // 10.5岁	130.0 	26.20 	133.6 	28.80 	137.6 	31.80 	141.5 	36.20 	145.5 	41.30 	149.2 	46.70 	153.1 	53.20 
        // 11岁	132.7 	28.00 	136.8 	30.60 	140.5 	34.00 	144.3 	38.50 	148.5 	44.10 	152.0 	49.90 	156.0 	56.80 
        // 11.5岁	135.9 	30.00 	140.0 	33.00 	143.5 	36.30 	147.4 	41.00 	151.2 	47.20 	155.3 	53.70 	158.9 	61.00 
        // 12岁	139.6 	32.10 	143.5 	35.20 	147.2 	38.80 	151.2 	44.10 	155.0 	50.70 	158.7 	57.40 	162.6 	65.40 
        // 12.5岁	143.2 	34.20 	147.2 	37.30 	151.0 	41.20 	155.0 	47.00 	159.0 	53.80 	163.0 	61.20 	166.4 	70.00 
        // 13岁	147.0 	36.20 	151.5 	39.60 	155.1 	43.90 	159.1 	49.50 	163.5 	56.70 	167.0 	64.50 	170.8 	74.10 
        // 13.5岁	151.0 	38.30 	155.0 	41.80 	159.0 	46.10 	163.0 	52.00 	167.0 	59.10 	171.2 	67.90 	174.6 	78.80 
        // 14岁	154.0 	40.30 	157.9 	43.90 	161.7 	48.20 	166.1 	54.30 	170.0 	61.55 	173.9 	70.80 	178.0 	82.80 
        // 14.5岁	156.3 	42.30 	160.4 	46.00 	164.0 	50.30 	168.3 	56.40 	172.2 	64.10 	176.1 	73.60 	180.1 	87.00 
        // 15岁	157.9 	43.90 	162.1 	47.50 	166.0 	52.20 	170.0 	58.40 	174.1 	66.30 	177.8 	76.30 	181.8 	90.80 
        // 15.5岁	159.0 	45.20 	163.2 	49.00 	167.1 	53.60 	171.0 	60.00 	174.9 	68.30 	178.8 	78.60 	182.9 	93.50 
        // 16岁	159.6 	46.30 	163.7 	50.00 	167.5 	54.60 	171.4 	61.10 	175.6 	70.00 	179.3 	80.55 	183.1 	95.50 
        // 16.5岁	160.0 	47.00 	163.9 	50.60 	168.0 	55.30 	171.9 	61.80 	175.7 	70.90 	179.8 	81.65 	183.2 	97.00 
        // 17岁	160.0 	47.50 	164.0 	51.40 	168.0 	56.00 	171.9 	62.60 	175.8 	71.50 	179.8 	82.30 	183.4 	98.00 
        // 17.5	160.1 	47.70 	164.1 	51.80 	168.1 	56.40 	172.0 	62.80 	175.9 	71.60 	179.8 	82.40 	183.4 	98.30 
        // 18岁	160.1 	48.00 	164.2 	52.10 	168.1 	56.90 	172.1 	63.10 	176.0 	71.80 	179.8 	82.50 	183.4 	98.60`

        // let eachLine = str.split('\n')

        // let after = eachLine.map(e => {
        //     return e.split(' 	')
        // })



        // let last = after.map(e => {
        //     e[0] = e[0].split('岁	')[1]
        //     return e
        // })

        // let temp = _.zip(...last)

        // temp = temp.map(v => {
        //     v = v.map(e => {
        //         return Number(e)
        //     })
        //     return v
        // })


        // let newTemp = []

        // newTemp = temp.map(v => {
        //     v = v.map(e => {
        //         return (e - 40).toFixed(1)
        //     })
        //     return v
        // })

        // temp = newTemp
        // console.log(newTemp)
        // let typeHeight = ['h3', 'h10', 'h25', 'h50', 'h75', 'h90', 'h97']
        // let typeWeight = ['w3', 'w10', 'w25', 'w50', 'w75', 'w90', 'w97']
        // let objH = {}
        // let objW = {}

        // typeHeight.map((e, i) => {
        //     objH[e] = temp[0 + i * 2]
        //     objW[typeWeight[i]] = temp[1 + i * 2]
        // })

        // for (let key in objH) {
        //     objH[key] = objH[key].map(e => {
        //         return Number(e)
        //     })
        // }

        // for (let key in objW) {
        //     objW[key] = objW[key].map(e => {
        //         return Number(e)
        //     })
        // }

        // let aaaH = JSON.stringify(objH).replaceAll(',', ', ').replaceAll('"', "'").replaceAll(':', ': ').replaceAll('],', '],\n')

        // console.log(aaaH)
        // // console.log(JSON.stringify(objW).replaceAll(',', ', ').replaceAll('"', "'").replaceAll(':', ': ').replaceAll('],', '],\n'))



        // let part2 = _.cloneDeep(after)
        // console.log(after)
        // let rule = ['3rd', '10th', '25th', '50th', '75th', '90th', '97th']
        // let rule2 = [36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216]

        // let grp = part2.map(e => {
        //     return _.chunk(e, 2)
        // })

        // console.log(grp)
        // let part2After = {}

        // let aaa = grp.map((e, i) => {
        //     let temp = {}
        //     let pp = {}

        //     e.map((v,j) => {
        //         temp[rule[j]] = v
        //     })
        //     pp[rule2[i]] = temp

        //     return pp
        // })

        // console.log(aaa)

        // let newa = {}

        // aaa.map(e => {
        //     for (let key in e) {
        //         newa[key] = e[key]
        //     }
        // })

        // console.log(newa)

        // let lasta = {}

        // //{ "h": "47.1", "w": "2.62", "type": "3rd" }
        // for (let key in newa) {
        //     lasta[key] = []
        //     for (let secKey in newa[key]) {
        //         let temp = {
        //             'h': newa[key][secKey][0],
        //             'w': newa[key][secKey][1],
        //             'type': secKey
        //         }

        //         lasta[key].push(temp)
        //     }
        // }

        // console.log(JSON.stringify(lasta))



        let str = [{"胎龄":24,"3rd":304,"10th":359,"25th":425,"50th":513,"75th":622,"90th ":740,"97th":880},{"胎龄":25,"3rd":395,"10th":466,"25th":550,"50th":662,"75th":796,"90th ":939,"97th":1105},{"胎龄":26,"3rd":487,"10th":575,"25th":677,"50th":811,"75th":968,"90th ":1132,"97th":1319},{"胎龄":27,"3rd":582,"10th":686,"25th":806,"50th":960,"75th":1138,"90th ":1321,"97th":1525},{"胎龄":28,"3rd":680,"10th":799,"25th":936,"50th":1109,"75th":1306,"90th ":1504,"97th":1723},{"胎龄":29,"3rd":781,"10th":917,"25th":1070,"50th":1261,"75th":1474,"90th ":1686,"97th":1916},{"胎龄":30,"3rd":890,"10th":1042,"25th":1212,"50th":1419,"75th":1648,"90th ":1872,"97th":2112},{"胎龄":31,"3rd":1012,"10th":1181,"25th":1367,"50th":1591,"75th":1835,"90th ":2071,"97th":2319},{"胎龄":32,"3rd":1152,"10th":1338,"25th":1541,"50th":1782,"75th":2039,"90th ":2285,"97th":2541},{"胎龄":33,"3rd":1314,"10th":1518,"25th":1737,"50th":1993,"75th":2264,"90th ":2519,"97th":2781},{"胎龄":34,"3rd":1503,"10th":1722,"25th":1955,"50th":2225,"75th":2506,"90th ":2768,"97th":3036},{"胎龄":35,"3rd":1719,"10th":1951,"25th":2193,"50th":2472,"75th":2760,"90th ":3028,"97th":3298},{"胎龄":36,"3rd":1960,"10th":2197,"25th":2445,"50th":2727,"75th":3018,"90th ":3286,"97th":3556},{"胎龄":37,"3rd":2204,"10th":2439,"25th":2685,"50th":2964,"75th":3251,"90th ":3515,"97th":3782},{"胎龄":38,"3rd":2409,"10th":2640,"25th":2879,"50th":3153,"75th":3433,"90th ":3691,"97th":3950},{"胎龄":39,"3rd":2543,"10th":2770,"25th":3006,"50th":3275,"75th":3550,"90th ":3803,"97th":4058},{"胎龄":40,"3rd":2623,"10th":2849,"25th":3083,"50th":3349,"75th":3621,"90th ":3872,"97th":4124},{"胎龄":41,"3rd":2681,"10th":2905,"25th":3138,"50th":3402,"75th":3673,"90th ":3921,"97th":4171},{"胎龄":42,"3rd":2731,"10th":2954,"25th":3185,"50th":3448,"75th":3717,"90th ":3963,"97th":4212}]
        let obj = {}

        let eachLine = str.map(v => {
            let i = v['胎龄']
            delete v['胎龄']
            obj[i] = v
        })

        console.log(obj)
        
    </script>
</body>

</html>